package com.itheima.ip;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Demo01 {


    public static void main(String[] args) throws UnknownHostException {

        InetAddress li = InetAddress.getByName("LAPTOP-5AF7UVN2");

        String ipAddress = li.getHostAddress();
        String hostName = li.getHostName();
        System.out.println(ipAddress);
        System.out.println(hostName);
    }
}
